package com.codemart.mapper;

import com.codemart.dto.*;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserInfoMapper {
    @Select("select u_id,nickname from system_user_login where u_id = #{userid}")
    UserInfoDTO userInfo(Integer userid);
    List<MyProjectsDTO> getMyProject(Integer uid);
    @Update("update system_user_login set nickname = #{nickname} where u_id = #{uid}")
    void updateUserLogin(Integer uid, String nickname);
    @Update("update system_user_info set address = #{address},birthday = #{birthday},phone = #{phone} where u_id = #{uid}")
    void updateUserInfo(Integer uid,String address,String birthday,String phone);

    void insertUserSku(Integer userId, String skuId);

    @Delete("delete from system_user_sku where user_id = #{userId}}")
    void deleteUserSku(Integer userId);

    List<MyBiddingInfoDTO> listMyBidding(Integer userId);

    UserSkuDTO getUserSku(Integer userId);

    void updateUserSku(Integer userId, String skuId);

    UsernameAndPasswordDTO getUserPassword(Integer uId);

}
